﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;

namespace FileThief
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            FileStream locker = null;
            try
            {
                locker = new FileStream(@".\Working.lock", FileMode.OpenOrCreate, FileAccess.ReadWrite);
            }
            catch (IOException)
            {
                MessageBox.Show("程序已经运行，请勿重复运行本程序！");
                System.Environment.Exit(1);
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FileThiefForm());
        }
    }    
}
